<template>
  <view class="login_outer">
    <beginOuterBox>
      <view slot="begintopImg" >
        <image class="begin_title_img" src="@/static/begin/begintop.png" ></image>
      </view>
      <view slot="hellow">Hello!</view>
      <view slot="titleText">欢迎来到新潮资讯</view>
      <!-- 开始页 -->
      <view class="begin_content_btnbox" slot="content">
        <view class="begin_content_btn" @click="goLoginPage">
          <text>登录</text>
        </view>
        <view class="begin_content_btn" @click="goRegisterPage">
          <text>注册</text>
        </view>
      </view>
    </beginOuterBox>
  </view>
</template>

<script>
import beginOuterBox from "@/components/beginOuterBox.vue";
import { mapState } from "vuex";

export default {
  data() {
    return {
      tips: "",
      seconds: 60,

    };
  },
  methods: {
    // 跳转登录页面
    goLoginPage() {
      uni.navigateTo({
        url: "/pages/login/index",
      });
    },
    // 跳转注册页面
    goRegisterPage() {
      uni.navigateTo({
        url: "/pages/register/index",
      });
    },
  },
  onShow(){
    clearTimeout(this.KlineTimer)
    clearInterval(this.newKlineTimer)
  },
  computed:{
    ...mapState(['newKlineTimer','KlineTimer'])
  },
  components: {
    beginOuterBox,
  },
};
</script>

<style lang="scss" scoped>
.login_outer {
  width: 100vw;
  height: 100vh;
  .begin_title_img {
      width: 126rpx;
      height: 126rpx;
      position: absolute;
      top: 62rpx;
      left: 58rpx;
    }
  .begin_content_btnbox {
    z-index: 999;
    position: absolute;
    top: 142rpx;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 92rpx;
    .begin_content_btn {
      width: 545rpx;
      height: 108rpx;
      background: linear-gradient(to right, #ff7007 0%, #ffa749 100%);
      border-radius: 38rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      text {
        font-size: 38rpx;
        font-family: DreamHanSansSC;
        font-weight: normal;
        color: #ffffff;
      }
    }
  }
}
</style>
